package com.itheima.jicheng.test1;
public class Demo1{
    public static void main(String[] args) {
        Student stu = new Student("张三",23,"1998-1-1","清华附中");
        System.out.println(stu.getInfo());
    }
}

abstract class Person {
    private String name;
    private int age;
    private String birthday;

    public Person() {
    }

    public Person(String name, int age, String birthday) {
        this.name = name;
        this.age = age;
        this.birthday = birthday;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }
    public abstract String getInfo();
}
class Student extends Person{
    private String school;

    public Student() {
    }

    public Student(String name, int age, String birthday, String school) {
        super(name, age, birthday);
        this.school = school;
    }

    public String getSchool() {
        return school;
    }

    public void setSchool(String school) {
        this.school = school;
    }

    @Override
    public String getInfo() {
        return "Student[name=" + getName()+ ", age=" + getAge() + ", birthday=" + getBirthday() + ", school=" + school + "]";
    }
}
